<!DOCTYPE html>

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>宽带组 : 项目组管理主页</title>

  <link href="../../css/bootstrapmin.css" rel="stylesheet" media="screen">
  <link href="../../css/style.css" rel="stylesheet">
<script type="text/javascript" src="../../js/header.js"></script>
</head>

<?php
require("header.php");
?>
<!-- end of header -->
 
<div style="width:700px;margin-left:auto;margin-right:auto;">
	<?php
	require("../../DBops.php");
	session_start();
	$con = connect("localhost", "root", "", "lab");
	$result = query($con, "*", "personalinfo", "ID", $_SESSION['user']);
	$row = mysql_fetch_array($result);
	
	
	if(isset($_SESSION['user']))
	{
		echo "<div style='height:30px;background:#A4D3EE;'>
		      
              <p  style='margin-right:10px;float:right;'>登录为: <a href = \"../../infor.php?id=".$_SESSION['user']."\">".$_SESSION['user']."</a></font>&nbsp&nbsp
			  <a  onclick=\"if(confirm('确定要退出系统吗?')){parent.location.href ='../../logout.php'}\" href=\"javascript:void(0)\">退出</a></font></p></div>";
	}

?>
	<div style="float:left;"><p ><strong>项目组管理</strong></p></div>
	<div style="float:right;"><a href='delete.php'><font color="blue">删除</font></a></div>
	<div style="width:700px;float:left;background:">
	<?php
	$con = connect("localhost", "root", "", "lab");

	$result =mysql_query("select * from projecteam");
//	$row = mysql_fetch_array($result);
	$count=mysql_num_rows($result);
	$rowsnum= ceil($count/6);

	echo"<div class='table sectionedit2'>
		<table >
			<tbody>";
			for($i=0;$i<$rowsnum;$i++){
				echo"<tr class='row0'>";
				$y=0;	
	
				while($y<6&&$row = mysql_fetch_array($result)){
					echo"<th style='width:;'><a href='Team.php?teamid=".$row['ID']."' title='".$row['name']."'>".$row['name']."</a>  </th>";
					$y++;
			
				}
				echo"</tr>";
			}
	?>
		</tbody></table>
	</div>

	<hr><br>
	
	<?php 

	echo"
	<div class='table sectionedit2'>
	<p><strong>添加项目组</strong></p>
		<table class='inline' border='0'>
			<tbody>
			<tr class='row0'>";
		
			
	
		echo"<form action='InsertTeam.php' method='get'><th class='col0 leftalign'>项目组名&nbsp;&nbsp
		</textarea> </th>
		<th class='col0 leftalign'> &nbsp;&nbsp项目组简介</textarea> </th>
		</tr><th class='col1 leftalign'>
		<textarea  name='name' value='' style='width:100px;height:20px;'></textarea> </th><th>
		<textarea  name='intro' value='' style='width:400px;height:50px;'></textarea> </th>
		<th><input type='submit' value='添加'><th></tr>
		
		</form>";
	
		
	
		?> </tbody></table>
		
		
	</div>
	<hr><br>

<?php 
	echo"
	<div class='table sectionedit2'>
	<strong>已删除项目组</strong>
		<table class='inline' border='0'>
			<tbody>
			";
			
			$result = mysql_query("select * from projecteam_history");
			$count_history=mysql_num_rows($result);
			$rowsnum_history= ceil($count_history/6);

			echo"<div class='table sectionedit2'>
		<table >
			<tbody>";
			for($i=0;$i<$rowsnum_history;$i++){
				echo"<tr class='row0'>";
				$y=0;	
	
				while($y<6&&$row = mysql_fetch_array($result)){
					echo"<th style='width:80px;'><a href='../history/Report_history.php?id=".$row['ID']."' title='".$row['name']."'>".$row['name']."</a>  </th>";
					$y++;
			
				}
				echo"</tr>";
			}
	?>
			
          
</div>
        
		<br/><br/>
<!-- ********** FOOTER ********** -->

</body></html>
